import React, { useEffect, useState } from 'react';
import './activityDetail.less';
import { activityLookDetailApi } from '@/api/createActivity.js';
export default function (props) {
  const [detailData, setDetailData] = useState({});
  useEffect(async () => {
    console.log(props.location.state);
    const res = await activityLookDetailApi(props.location.state);
    console.log(res.data.data);
    setDetailData(res.data.data);
  }, []);
  return (
    <div>
      <div className="detail-title">
        <div className="detail-first">创建活动/详情</div>
        <div className="detail-second">详情</div>
      </div>
      <div
        className="site-layout-background"
        style={{ padding: 24, minHeight: '100vh' }}
      >
        <div className="detail-content">
          <div className="detail-all">
            <div className="detail-left">
              <div className="detail-msg">活动信息</div>
              <div className="detail-name">
                活动名称:{detailData.activityName}
              </div>
            </div>
            <div className="detail-right">
              <div className="detail-state">状态</div>
              {/* <div className="detail-down">{detailData.activityStatus}</div> */}
            </div>
          </div>
          <div className="detail-where">
            活动地点：<span className="detail-item">{detailData.cityName}</span>
          </div>
          <div className="detail-time">
            活动时间：
            <span className="detail-item">
              {/* 2010-10-10 09:12:31 - 2010-12-1009:12:31 */}
              {detailData.startDate + ' - ' + detailData.endDate}
            </span>
          </div>
          <div>
            <div className="detail-one">
              <div>活动内容：</div>
              <div className="detail-font detail-text">
                {detailData.activityContent}
              </div>
            </div>
          </div>
          <div>
            <div className="detail-two">
              <div> 日程安排：</div>
              <div>
                <div className="detail-item">2015-10-12 报名</div>
                <div className="detail-item"> 2015-10-15 签到</div>
              </div>
            </div>
          </div>
          <div className="detail-why">
            驳回原因：<span className="detail-item">无</span>
          </div>
        </div>
      </div>
    </div>
  );
}
